{% if viewField %}
    {% if disableSubmit != 1 %}
        <div class="card">
            <div class="card-body" style="display: block;">
    {% endif %}
            {% for k,v in viewField %}
                <div class="form-group">
                    <label for="title">{{ k }} :</label>
                    {% if v['type'] == 'text' %}
                    <div class="input-group">
                        <input type="text"
                        disabled="true"
                        {% if v['attributes'] %}
                            {% for ok,ov in v['attributes'] %}
                                {{ ok }}="{{ ov }}"
                            {% endfor %}
                        {% endif %}

                               value="{{ v['defaultValue'] }}"
                               class="form-control form-control-sm"
                        >
                    </div>
                    {% endif %}

                    {% if v['type'] == 'string' %}
                        <label>{{ v['defaultValue'] }}</label>
                    {% endif %}

                    {% if v['type'] == 'daterange' %}
                            <div class="input-group">
                                <div class="input-group-prepend">
                                  <span class="input-group-text">
                                    <i class="mdi mdi-calendar-range"></i>
                                  </span>
                                </div>
                                <input type="text"
                                {% if v['attributes'] %}
                                    {% for ok,ov in v['attributes'] %}
                                            {{ ok }}="{{ ov }}"
                                    {% endfor %}
                                {% endif %}
                                value="{{ if_get(v['defaultValue'], '') }}"
                                class="form-control form-control-sm daterange"
                                >
                            </div>
                    {% endif %}

                     {% if v['type'] == 'datetime' %}
                            <div class="input-group">
                                <div class="input-group-prepend">
                                    <span class="input-group-text"><i class="mdi mdi-clock"></i></span>
                                </div>
                                <input type="text"

                                {% if v['attributes'] %}
                                    {% for ok,ov in v['attributes'] %}
                                        {{ ok }}="{{ ov }}"
                                    {% endfor %}
                                {% endif %}

                                value="{{ if_get(v['defaultValue'], '') }}"
                                class="form-control form-control-sm datetime"
                              >
                            </div>
                    {% endif %}

                    {% if v['type'] == 'date' %}
                            <div class="input-group">
                                <div class="input-group-prepend">
                                    <span class="input-group-text"><i class="mdi mdi-clock"></i></span>
                                </div>
                                <input type="text"
                                {% if v['attributes'] %}
                                    {% for ok,ov in v['attributes'] %}
                                        {{ ok }}="{{ ov }}"
                                    {% endfor %}
                                {% endif %}

                                value="{{ if_get(v['defaultValue'], '') }}"
                                class="form-control form-control-sm date"
                              >
                            </div>
                    {% endif %}

                    {% if v['type'] == 'datetimerange' %}
                            <div class="input-group">
                                <div class="input-group-prepend">
                                    <span class="input-group-text"><i class="mdi mdi-clock"></i></span>
                                </div>
                                <input type="text"

                                {% if v['attributes'] %}
                                    {% for ok,ov in v['attributes'] %}
                                            {{ ok }}="{{ ov }}"
                                    {% endfor %}
                                {% endif %}

                                 value="{{ if_get(v['defaultValue'], '') }}"
                                class="form-control form-control-sm datetimerange"
                              >
                            </div>
                    {% endif %}

                    {% if v['type'] == 'file' %}
                            <div class="input-group">
                                <input type="hidden" name="{{ v['field'] }}"  value="{{ v['defaultValue'] }}" >
                                <input type="file" data-field="{{ v['field'] }}" data-disabled=1
                                       {% if v['attributes'] %}
                                            {% for ok,ov in v['attributes'] %}
                                                {% if ok != "name" and ok != "id" %}
                                                    {{ ok }}="{{ ov }}"
                                                {% endif %}
                                            {% endfor %}
                                        {% endif %}
                                        multiple
                                       class="form-control form-control-sm ufile"
                                />
                            </div>
                    {% endif %}

                    {% if v['type'] == 'password' %}
                            <div class="input-group">
                                <div class="input-group-prepend">
                                    <span class="input-group-text"><i class="mdi mdi-key"></i></span>
                                </div>
                                <input type="password"

                                        {% if v['attributes'] %}
                                            {% for ok,ov in v['attributes'] %}
                                                {{ ok }}="{{ ov }}"
                                            {% endfor %}
                                        {% endif %}

                                       class="form-control form-control-sm"
                                />
                            </div>
                    {% endif %}

                    {% if v['type'] == 'textarea' %}
                            <div class="input-group">
                                <textarea
                                {% if v['attributes'] %}
                                    {% for ok,ov in v['attributes'] %}
                                        {{ ok }}="{{ ov }}"
                                    {% endfor %}
                                {% endif %}
                                class="form-control form-control-sm"
                              disabled="disabled"
                                >{{ v['defaultValue'] }}</textarea>
                            </div>
                    {% endif %}

                    {% if v['type'] == 'boole' %}
                        <div class="input-group">
                        <input type="text"
                            {% if v['attributes'] %}
                                {% for ok,ov in v['attributes'] %}
                                    {{ ok }}="{{ ov }}"
                                {% endfor %}
                            {% endif %}
                          disabled="disabled"
                          value="{% if v['defaultValue'] %}是{% else %}否{% endif %}"
                        >
                        </div>
                  {% endif %}

                    {% if v['type'] == 'select' %}
                        <div class="input-group">
                          <input type="text"
                                    {% if v['attributes'] %}
                                        {% for ok,ov in v['attributes'] %}
                                            {{ ok }}="{{ ov }}"
                                        {% endfor %}
                                    {% endif %}
                          class="form-control form-control-sm"
                                   disabled="disabled"
                          {% set selectV = get_prop(v['options'],"") %}
                            value="{% if selectV %}{% for sk,sv in selectV %}{% if sv==v['defaultValue'] %}{{ sk|raw }}{% endif %}{% endfor %}{% endif %}"
                                     />
                        </div>
                    {% endif %}

                    {% if v['type'] == 'multiSelect' %}
                            <div class="input-group" >
                                <input type="hidden" name="formHidden-{{ v['field'] }}" value="{{ v['defaultValue']|json_encode }}"  />
                                <select

                                {% if v['attributes'] %}
                                    {% for ok,ov in v['attributes'] %}
                                        {{ ok }}="{{ ov }}"
                                    {% endfor %}
                                {% endif %}

                                        class="form-control form-control-sm select"
                                        multiple="multiple"
                                        style="width: 100%;"
                              disabled="disabled"
                                >
                                    {% set selectV = get_prop(v['options'],"") %}
                                    {% if selectV %}
                                        {% for k,v in selectV %}
                                            <option value="{{ v }}">{{ k|raw }}</option>
                                        {% endfor %}
                                    {% endif %}
                                </select>
                            </div>
                    {% endif %}

                    {% if v['type'] == "search_select" %}
                                <div class="input-group" >
                                   <input type="hidden" name="formHidden-{{ v['field'] }}" value="{{ v['defaultValue']|json_encode }}"  />
                                    {% set selectV = get_prop(v['options'],"") %}
                                    <select

                                    {% if v['attributes'] %}
                                        {% for ok,ov in v['attributes'] %}
                                            {{ ok }}="{{ ov }}"
                                        {% endfor %}
                                    {% endif %}

                                    class="form-control form-control-sm search_select"
                                    data-url="{{ selectV[0] }}"
                                    style="width: 100%;"
                                  disabled="disabled"
                                    >
                                    {% if selectV[1] %}
                                        {% for k,v in selectV[1] %}
                                            <option value="{{ v }}">{{ k|raw }}</option>
                                        {% endfor %}
                                    {% endif %}
                                    </select>
                                </div>
                    {% endif %}

                    {% if v['type'] == "search_multiple_select" %}
                            <div class="input-group" >
                                <input type="hidden" name="formHidden-{{ v['field'] }}" value="{{ v['defaultValue']|json_encode }}"  />
                                {% set selectV = get_prop(v['options'],"") %}
                                <select

                                {% if v['attributes'] %}
                                    {% for ok,ov in v['attributes'] %}
                                        {{ ok }}="{{ ov }}"
                                    {% endfor %}
                                {% endif %}

                                class="form-control form-control-sm search_select"
                                multiple="multiple"
                                data-url="{{ selectV[0] }}"
                                style="width: 100%;"
                              disabled="disabled"
                                >
                                {% if selectV[1] %}
                                    {% for k,v in selectV[1] %}
                                        <option value="{{ v }}">{{ k|raw }}</option>
                                    {% endfor %}
                                {% endif %}
                                </select>
                            </div>
                    {% endif %}

                    {% if v['type'] == 'rich_editor2' %}
                            <div class="input-group" >
                <textarea  class="form-control form-control-sm rich_text"
                {% if v['attributes'] %}
                    {% for ok,ov in v['attributes'] %}
                        {{ ok }}="{{ ov }}"
                    {% endfor %}
                {% endif %}
                    disabled="disabled"
                />{{ v['defaultValue']}}</textarea>
                            </div>
                    {% endif %}

                    {% if v['type'] == 'rich_editor' %}
                    <div class="input-group" >
                        <textarea class="display-hide"
                        {% if v['attributes'] %}
                            {% for ok,ov in v['attributes'] %}
                                {% if ok=="id" %}
                                    {{ ok }}="{{ ov }}_textarea"
                                {% else %}
                                    {{ ok }}="{{ ov }}"
                                {% endif %}
                            {% endfor %}
                        {% endif %}
                        >{{ v['defaultValue']}}</textarea>
                        <div  class="rich_text"
                        {% if v['attributes'] %}
                            {% for ok,ov in v['attributes'] %}
                                {% if ok!="name" %}
                                    {{ ok }}="{{ ov }}"
                                {% endif %}
                            {% endfor %}
                        {% endif %}
                        /></div>
                            </div>
                    {% endif %}

                </div>
            {% endfor %}
    {% if disableSubmit != 1 %}
        </div>
        </div>
    {% endif %}
{% endif %}
